<?php $uid = uniqid(); ?>
<?php $arr = $this->get("posts");?>
	<div class="x-list-title">
		<table width="100%" border="0" height="100%">
		<tr>
			<td align="left">
				<h2><?php $titleDep = $this->titleDep;
						if($titleDep!=""){
							_e($titleDep);
						}else{
							_e("Danh sách nhân viên"); 
						}
					?>
				</h2>
			</td>
			<td align="right">	
				<div class="x-list-options">
					<a href="#Personnel/Index/add" class="x-button">Nhân sự mới</a>
					<div class="x-options-container">
						<a class="x-button">Tác vụ khác  <span class="x-tri">&#9660;</span></a> 
							<div class="x-options">
								<a href="#Personnel/Index/Salaryup?phase=1" class="x-options-item x-track">Tăng lương đợt I</a>
								<a href="#Personnel/Index/Salaryup?phase=2" class="x-options-item x-track">Tăng lương đợt II</a>							
								<a onclick="module_delete('<?php _moduleUrl($this);?>/Act/Delete?url=<?php _e(rawurlencode('Personnel'.(get('dep_id') ? '?dep_id='.get('dep_id'): '')));?>','f<?php _e($uid);?>',this)"  class="x-options-item x-track">Xóa đã chọn</a>
								<a href="#Personnel/Chart" class="x-options-item x-track">Thống kê tỷ lệ</a>
								<a class="x-options-item" onclick="module_frame('<?php _moduleUrl($this);?>/Export','f<?php _e($uid);?>', this)">Export Excel</a>
							</div>
					</div>			
				</div>
			</td>
		</tr>
		
		</table>	
	</div>
<form action="<?php _baseUrl()?>/Personnel/Act/delete" method="post" id="f<?php _e($uid);?>">	
<div id="content_document">	
		<?php $vars = $this->get('vars');?>
		<table width="100%" cellpadding="5" class="x-list">
			<tr style="background:#D3D2C1">
				<th width="25">
					TT
				</th>
				
				<th>
					<?php show_order_link('Họ tên','name','#Personnel',$vars) ;?>
				</th>
				<th width="150">
					<?php show_order_link('Phòng ban','depart_name','#Personnel',$vars) ;?>
					
				</th>
				<th width="110">
					<?php show_order_link('Chức vụ','functions','#Personnel',$vars) ;?>
				</th>
				<th width="110">
					<?php show_order_link('Ngày tăng','date_change','#Personnel',$vars) ;?>
				</th>
				<th width="100">
					<?php show_order_link('Hệ số cũ','old_param','#Personnel',$vars) ;?>
				</th>
				<th width="100" >
					<?php show_order_link('Hệ số mới','new_param','#Personnel',$vars) ;?>
				</th>
				<th colspan="2" width="50">Tác vụ</th>
				<th align="center" width="25">
					<div class="x-check-container">
						<div class="x-check">
						<input type="checkbox" class="x-checkbox x-checkall"/>
						</div>
						<div class="x-check-options">
							<a class="x-check-item check-all">Chọn tất cả</a>
							<a class="x-check-item uncheck-all">Bỏ chọn tất cả</a>
						</div>
					</div>
				</th>
			</tr>
			<?php if(count($arr)==0):?>
				<tr><td colspan='11' class='x-page'>Không có nhân sự nào sắp tăng lương</td></tr>
			<?php else:?>
			<?php foreach( $arr as $k =>$a ):?>
			<tr>
				<td align="center">
					<?php _e($k+1);?>
				</td>				
				<td>
					<a href="#Personnel/Index/view?ID=<?php _e($a['ID'])?>"><?php _e($a['name']);?></a>
				</td>
				<td align="center">
					<?php _e(short_title($a['depart_name'],40));?>
				</td>
				<td align="center">
					<?php _e($a['functions']);?>
				</td>
				<td align="center">
					<?php _e($a['date_change']);?>	
				</td>
				<td align="center">
					<?php _e($a['old_param']);?></span>
				</td>
				<td align="center">
					<?php _e($a['new_param']);?></span>
				</td>
				<td align="center" width="25">
					<a href="#Personnel/Index/Edit?ID=<?php _e($a['ID'])?>"  class="x-edit"></a>
				</td>
				<td align="center" width="25">
					<a  onclick="module_delete('<?php _baseUrl();?>/Personnel/Index/Delete?ID=<?php _e($a['ID'])?>')" class="x-delete"></a>
				</td>
				<td width="25" align="center">
					<input name="ID[]" value="<?php _e($a['ID'])?>" type="checkbox" class="x-checkbox x-checkall"/>
				</td>
			</tr>
			<?php endforeach;?>	
			<tr>
				<td colspan="10" class="page">
					<div class="x-page">
						<?php $this->e("page");?>
					</div>		
				</td>
			</tr>
			<?php endif;?>
		</table>
</div>
</form>